// src/api/auth.js
import { apiClient } from './base'

export const login = async (data) => {
  try {
    const response = await apiClient.post('/auth/login', data)
    return response.data
  } catch (error) {
    throw error.response?.data || error
  }
}

export const logout = () => {
  localStorage.clear()
}